<template>
  <table v-if='getCopy && getCopy.length' cellpadding='0'  cellspacing='0' class='oa-classify__table'>
    <tr class='oa-classify__hd'>
        <td width='30%'>事务编号</td>
        <td>发起人</td>

        <td>状态</td>
        <td>发起时间</td>
        <td style='width:60px'>操作</td>
    </tr>
    <tr v-for=' ( item, index ) in getCopy ' :key='index' class='sp-section__list-group'>
      <td @click='lookFunc(item)'>
        <div>
          {{item.approve_name}}
        </div>
        <span class='oa-classify__sub'>{{item.reason}}</span>
      </td>
      <td>{{item.truename}}</td>
      <td>{{item.msg}}</td>
      <td>{{item.created_at}}</td>
      <td><el-button type='primary' @click='lookFunc(item)'>查看</el-button></td>
    </tr>
  </table>
</template>
<script>
export default {
  props: ['getCopy'],
  methods: {
    lookFunc (item) {
      console.log(JSON.stringify(item))
      window.localStorage.setItem('approve', JSON.stringify(item))
      this.$router.push({ name: 'oaMain', query: { approve: item, from: 'copy', active: 6 } })
    }
  }
}
</script>
